﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IronOne.SalesOne.BusinessObjects
{
    public class JobHistory
    {
        private DateTime? startTime;
        private DateTime? completionTime;
        private int duration;
        private string status;

        public DateTime? StartTime
        {
            get
            {
                return startTime;
            }
            set
            {
                startTime = value;
            }
        }

        public DateTime? CompletionTime
        {
            get
            {
                if (startTime != new DateTime())
                    return ((DateTime)(startTime)).Add(new TimeSpan(duration));
                else
                    return null;
            }
        }

        public int Duration
        {
            get
            {
                return duration;
            }
            set
            {
                duration = value;
            }
        }

        public string Status
        {
            get
            {
                return status;
            }
            set
            {
                status = value;
            }
        }
    }
}
